-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new dsn for destroy group #535
add new dsn for destroy group #535
Conversation
69f4621
to
e869041
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #535 +/- ##
===========================================
+ Coverage 56.51% 68.23% +11.72%
===========================================
Files 108 109 +1
Lines 10300 10431 +131
Branches 1402 1398 -4
===========================================
+ Hits 5821 7118 +1297
+ Misses 3894 2639 -1255
- Partials 585 674 +89 ☔ View full report in Codecov by Sentry. |
e869041
to
3e3fbfd
Compare
fef6bb0
to
952b530
Compare
if (remain_cnt-- > 0) { | ||
size_t avail_size = out_buf->size() - out_buf->pos(); | ||
if (avail_size < entry.size() + sizeof(uint32_t)) { | ||
avail_size += std::max(out_buf->size() * 2, (size_t)entry.size() + sizeof(uint32_t)); | ||
// available size of packing buffer should be able to hold entry.size() and the length of this entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yamingk I address your comments for the last PR here, PATL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if we have a rreq {originator=1, term=1, dsn=0, lsn=7} in follower and a baseline resync is triggerd before the rreq is committed in the follower, then the on_commit of the rreq will not be called and as a result this rreq will become a garbage rreq in this follower. now if we trigger a destroy_group, a new rreq {originator=1, term=1, dsn=0} will created in the follower since the default dsn of a repl_key is 0.after the log of this rreq is appended to log store and get a new lsn, if we link the new lsn to the old rreq which has alread have a lsn, then a assert will be throw out. pls refer to repl_req_ctx::set_lsn
in this pr, we set the dsn to a new one , which is definitely unique in the follower, so that the new rreq will not have a conflict with the old rreq.